package com.netease.pris.activity;

import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.netease.framework.k;
import com.netease.pris.atom.g;
import com.netease.pris.atom.u;
import java.util.LinkedList;

class fw extends BaseAdapter
{
  private static final String b = "SourceListAdapter";

  private fw(MainGridActivity paramMainGridActivity)
  {
  }

  private int a()
  {
    return this.a.getResources().getDimensionPixelSize(2131296259);
  }

  private bd a(View paramView)
  {
    Object localObject;
    if (paramView == null)
      localObject = null;
    while (true)
    {
      return localObject;
      bd localbd = new bd(this, null);
      View localView1 = paramView.findViewById(2131558485);
      if (localView1 == null)
      {
        localObject = null;
        continue;
      }
      localbd.a = ((ImageView)localView1);
      View localView2 = paramView.findViewById(2131558489);
      if (localView2 == null)
      {
        localObject = null;
        continue;
      }
      localbd.b = ((TextView)localView2);
      View localView3 = paramView.findViewById(2131558487);
      if (localView3 == null)
      {
        localObject = null;
        continue;
      }
      localbd.c = ((ImageView)localView3);
      localObject = localbd;
    }
  }

  private void a(u paramu, View paramView)
  {
    if ((paramView == null) || (paramu == null) || (paramu.V().equals("-1")));
    while (true)
    {
      return;
      bd localbd = a(paramView);
      if (localbd == null)
        continue;
      String str1 = paramu.U();
      if (str1 != null)
        localbd.b.setText(str1);
      String str2 = paramu.b(g.g);
      if (str2 == null)
        continue;
      StringBuilder localStringBuilder = new StringBuilder();
      localbd.a.setTag(localStringBuilder);
      com.netease.image.d.a().a(localStringBuilder, 1, str2, new dz(this, localbd), -1, -1, 0, com.netease.b.a.d.f());
    }
  }

  private int b()
  {
    return this.a.getResources().getDimensionPixelSize(2131296258);
  }

  public int getCount()
  {
    return MainGridActivity.c(this.a).size();
  }

  public Object getItem(int paramInt)
  {
    return MainGridActivity.c(this.a).get(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    if ((paramInt < 0) || (paramInt >= getCount()))
      paramView = null;
    u localu;
    while (true)
    {
      return paramView;
      localu = (u)MainGridActivity.c(this.a).get(paramInt);
      if (!localu.V().equals("-1"))
        break;
      if (paramView != null)
      {
        if ((ImageView)paramView.findViewById(2131558484) != null)
          continue;
        paramView = this.a.getLayoutInflater().inflate(2130903066, paramViewGroup, false);
        continue;
      }
      paramView = this.a.getLayoutInflater().inflate(2130903066, paramViewGroup, false);
    }
    if (paramView != null)
    {
      bd localbd = a(paramView);
      if (localbd != null)
      {
        localbd.a.setImageResource(k.a(MainGridActivity.p(this.a)).a(2130837804));
        localbd.b.setText("");
      }
    }
    while (true)
    {
      a(localu, paramView);
      break;
      paramView = this.a.getLayoutInflater().inflate(2130903068, paramViewGroup, false);
      continue;
      paramView = this.a.getLayoutInflater().inflate(2130903068, paramViewGroup, false);
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.activity.fw
 * JD-Core Version:    0.6.0
 */